package main

import (
	"fmt"
	"time"
)

func main() {
	//开启一个协程
	//主线程关闭，即使协程没有完成也会关闭
	go test()
	for i := 0; i < 10; i++ {
		fmt.Println("main() hello world", i)
		time.Sleep(time.Second)
	}
}

func test() {
	for i := 0; i < 10; i++ {
		fmt.Println("test() hello world", i)
		time.Sleep(time.Second * 3)
	}
}
